package com.fastCms.customer.friend.controller;


import com.fastCms.business.bim.manage.DynamicManageService;
import com.fastCms.business.bim.pojo.vo.DynamicVO;
import com.fastCms.business.frame.pojo.PageParam;
import com.fastCms.business.frame.response.ApiResponse;
import com.fastCms.business.frame.response.ResponseUtil;
import com.fastCms.business.friend.pojo.po.DynamicPO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 动态 前端控制器
 * </p>
 *
 * @author quan
 * @since 2024-05-22
 */
@RestController
@RequestMapping("api/dynamic")
@Api(value = "ApiDynamicController", tags = "C端-动态列表")
public class ApiDynamicController {

    @Autowired
    private DynamicManageService dynamicManageService;

    @PostMapping("/showPage")
    @ApiOperation(value = "动态列表", notes = "分页")
    public ApiResponse<PageInfo<DynamicVO>> showPage(@RequestBody PageParam<DynamicPO> param) {
        PageInfo<DynamicVO> result = dynamicManageService.showPage(param);
        return ResponseUtil.success(result);
    }

}

